package loyaltypartner.dao;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Member 
{
	@Id
	private String memberID;
	private MemberStatus status;
	private String firstName;
	private String lastName;
	private String PIN;
	private String email;
	private String phoneNumber;
	private int balance;
	
	Member(String memberID, String firstName, String lastName, String PIN, String email, String phoneNumber, int balance)
	{
		setMemberID(memberID);
		setStatus(MemberStatus.ACTIVE);
		setFirstName(firstName);
		setLastName(lastName);
		setPIN(PIN);
		setEmail(email);
		setPhoneNumber(phoneNumber);
		setBalance(balance);
	}
	
	public MemberStatus getStatus() {return this.status;}
	void setStatus(MemberStatus status) {this.status = status;}
	public String getFirstName() {return firstName;}
	void setFirstName(String firstName) {this.firstName = firstName;}
	public String getLastName() {return lastName;}
	void setLastName(String lastName) {this.lastName = lastName;}
	public String getPIN() {return PIN;}
	void setPIN(String PIN) {this.PIN = PIN;}
	public String getEmail() {return email;}
	void setEmail(String email) {this.email = email;}
	public String getPhoneNumber() {return phoneNumber;}
	void setPhoneNumber(String phoneNumber) {this.phoneNumber = phoneNumber;}
	public int getBalance() {return balance;}
	void setBalance(int balance) {this.balance = balance;}
	public String getMemberID() {return memberID;}
	private void setMemberID(String memberID) {this.memberID = memberID;}
}

enum MemberStatus
{
	ACTIVE, BLOCKED;
}
